#{extends 'organization.html' /} 
	<script type="text/javascript" src="@{'/public/javascripts/jquery.validate.js'}"></script> 
	<script type="text/javascript" src="@{'/public/javascripts/jquery.validate.min.js'}"></script> 
	<script type="text/javascript" src="@{'/public/javascripts/validation.js'}"></script> 
	
<h1 class="viewTitle">Choose Organizer</h1>
<div class="viewContent"> 
#{if logged==0}
#{set title: 'Denied'/}
<h2>Denied Action</h2> 
<h3>Sorry, you aren't approved to this action </h3>
#{/if}
#{else}
#{set title: organization.name/}
#{if logged==1}
<h3>Sorry, There are no organizers in this organization not given previously lead
privilages </h3> 
#{/if}
#{else}

	#{ifErrors}
	<div class="error">
 <h4>Oops</h4>
   #{errors}
       <li>${error}</li>
   #{/errors}
   </div>
#{/ifErrors}

	#{form @Application.giveOrganizerLeadPrivilages(organization.id), id:'giveLeadFrom'}   
	<div class="formEntry">
	<div class="formLabel" id = "divOne"> 
	Name of Organizer :-
	------------------
	</div>
	<div class="formLabel" id = "divTwo"> 
	Organizing Entities :-  
	-------------------
	</div>
	<div class="clear"></div>
	</div>
	#{list items:organizers, as:'user'}
	    <div class="formEntry">
		<input type="checkbox" name="organizerID" value="${user.id}" />
		<div class="formLabel" id = "divOne"> 
	    <a href="@{Users.viewUserProfile(user.userName)}" class="standardLink">
	    ${user.name}
	    </a>
	    </div>
	    <div class="formLabel" id = "divTwo"> 
	    ${organization.getOrganizingEntities(user.id)}
	    </div>
		</div>
	#{/list}
	<div class="formEntry">
	<input type="submit" value="Give Lead's Privilages" />
	</div>
	#{/form}
#{/else}
#{form @Browse.viewOrganization(organization.id)}
<div class="formEntry">
<input type="submit" value="Back to Organization page" />
</div>
#{/form}
#{/else}
</div>